<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <title>SCM</title>
        <link href="./libs/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
        <link href="./css/aowin.css" rel="stylesheet" />
        <script src="./js/jq.js"></script>
        <script src="./libs/bootstrap/js/bootstrap.min.js"></script>
        <script src="./js/bootstrap-paginator.js"></script>
        <script src="./js/art.js"></script>
        <script src="./libs/layer/layer.js"></script>
        <script src="./js/user.js"></script>
        <script src="./js/category.js"></script>
        <script src="./js/vender.js"></script>
        <script src="./js/pomain.js"></script>
        <script src="./js/menus.js"></script>
        <script src="./js/common.js"></script>
        <script src="/libs/laydate/laydate.js"></script>
        <script src="./js/customer.js"></script>
        <script src="./js/somain.js"></script>
        <script src="./js/store.js"></script>
    </head>
    <body>
        <div class="container-fluid">
            <!-- top -->
            <div id="top" class="col-md-12">
                <div class="col-md-10">SCM后台管理系统</div>
                <div class="col-md-2">
                    欢迎<span id="name"></span>登录
                    <button type="button" class="btn btn-primary" onclick="logout()">退出</button>
                </div>
            </div>
            <!-- 左侧导航 -->
            <div id="left" class="col-md-2">
                <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"></div>
            </div>
            <!-- 右侧内容,都是由ajax动态加载 -->
            <div id="main" class="col-md-10">
                <!-- <div z-index="1234"></div> -->
            </div>
        </div>
        <!-- 左侧导航模板 -->
        <script id="menu" type="text/html">
            {{each items}}
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a
                            class="btn btn-primary btn-block"
                            role="button"
                            data-toggle="collapse"
                            data-parent="#accordion"
                            href="{{'#collapse'+$index}}"
                        >
                            {{$value.name}}
                        </a>
                    </h4>
                </div>
                <div id="{{'collapse'+$index}}" class="panel-collapse collapse">
                    <div class="panel-body">{{include 'menuItem' $value.children}}</div>
                </div>
            </div>
            {{/each}}
        </script>
        <script id="menuItem" type="text/html">
            {{each list}}
            <button type="button" class="btn btn-primary btn-block" onclick="{{'show(\''+ $value.url +'\')'}}">
                {{$value.name}}
            </button>
            {{/each}}
        </script>
        <script>
            // 初始化导航
            $(function () {
                var html = template('menu', menuData)
                $('#accordion').html(html)
                document.getElementById("name").innerHTML=sessionStorage.getItem("name")
            })
            // 退出登录
            function logout(){
                
            }

        </script>
    </body>
</html>
